home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / library / reqtlsdv.lha / ReqTools / doc / reqtools.doc next >
Text File  |  1994-01-07  |  88KB  |  1,894 lines

  1. TABLE OF CONTENTS
  2.  
  3. reqtools.library/rtAllocRequestA
  4. reqtools.library/rtChangeReqAttrA
  5. reqtools.library/rtCloseWindowSafely
  6. reqtools.library/rtEZRequestA
  7. reqtools.library/rtFileRequestA
  8. reqtools.library/rtFontRequestA
  9. reqtools.library/rtFreeFileList
  10. reqtools.library/rtFreeReqBuffer
  11. reqtools.library/rtFreeRequest
  12. reqtools.library/rtGetLongA
  13. reqtools.library/rtGetStringA
  14. reqtools.library/rtGetVScreenSize
  15. reqtools.library/rtLockWindow
  16. reqtools.library/rtPaletteRequestA
  17. reqtools.library/rtReqHandlerA
  18. reqtools.library/rtScreenModeRequestA
  19. reqtools.library/rtScreenToFrontSafely
  20. reqtools.library/rtSetReqPosition
  21. reqtools.library/rtSetWaitPointer
  22. reqtools.library/rtSpread
  23. reqtools.library/rtUnlockWindow
  24.  
  25. reqtools.library/rtAllocRequestA             reqtools.library/rtAllocRequestA
  26.  
  27.   NAME  rtAllocRequestA()
  28.  
  29.     req = rtAllocRequestA (type, taglist);
  30.  
  31.     APTR rtAllocRequestA (ULONG, struct TagItem *);
  32.     D0                    D0     A0
  33.  
  34.     req = rtAllocRequest (type, tag1,...);
  35.  
  36.     APTR rtAllocRequest (ULONG, Tag,...);
  37.  
  38.   DESCRIPTION
  39.     Allocates a requester structure for you in a future compatible manner.
  40.     This is the only way to properly allocate a rtFileRequester,
  41.     rtFontRequester, rtReqInfo or rtScreenModeRequester structure.  The
  42.     structure will be initialized for you.
  43.  
  44.     Use rtFreeRequest() to free the requester structure when you no longer
  45.     need it.
  46.  
  47.   INPUTS
  48.     type    - type of structure to allocate, currently RT_REQINFO,
  49.               RT_FILEREQ, RT_FONTREQ or RT_SCREENMODEREQ.
  50.     taglist - pointer to array of tags (currently always NULL).
  51.  
  52.   TAGS
  53.     no tags defined yet
  54.  
  55.   RESULT
  56.     req - pointer to the requester allocated or NULL if no memory.
  57.  
  58.   BUGS
  59.     none known
  60.  
  61.   SEE ALSO
  62.     rtFreeRequest()
  63.  
  64. reqtools.library/rtChangeReqAttrA           reqtools.library/rtChangeReqAttrA
  65.  
  66.   NAME  rtChangeReqAttrA()
  67.  
  68.     [long =] rtChangeReqAttrA (req, taglist);
  69.  
  70.     [LONG] rtChangeReqAttrA (APTR, struct TagItem *);
  71.                       A1    A0
  72.  
  73.     [long =] rtChangeReqAttr (req, tag1,...);
  74.  
  75.     [LONG] rtChangeReqAttr (APTR, Tag,...);
  76.  
  77.   DESCRIPTION
  78.     Change requester attributes with supplied taglist.  This is the only
  79.     correct way to change the attributes listed below.
  80.  
  81.     The return code from rtChangeReqAttrA() should be ignored unless stated
  82.     otherwise.
  83.  
  84.     Don't pass the tags listed below to the requester itself (unless
  85.     documented otherwise).  They will not be recognized.
  86.  
  87.   INPUTS
  88.     req     - pointer to requester.
  89.     taglist - pointer to array of tags.
  90.  
  91.   TAGS
  92.     for the file requester:
  93.         RTFI_Dir         - (char *)
  94.                            Name of new directory to position file requester
  95.                            in. The requester's buffer will be deallocated.
  96.         RTFI_MatchPat    - (char *)
  97.                            New pattern string to match files on.
  98.         RTFI_AddEntry    - (BPTR)
  99.                            THIS *MUST* BE THE LAST TAG (just before TAG_END)!
  100.                            Tagdata must hold a lock on a file or directory
  101.                            you want to add to the file requester's buffer.
  102.                            The lock should have been obtained using Lock(),
  103.                            and you must unlock this lock yourself.
  104.                            It is your responsibility to make sure the file
  105.                            or directory is indeed in the directory the file
  106.                            requester is in.
  107.                            If the entry is already in the file requester's
  108.                            buffer it will simply be updated.
  109.                            It is harmless to use this tag if the requester's
  110.                            buffer is not initialized. rtChangeReqAttr() will
  111.                            return a boolean to indicate success or failure
  112.                            (out of memory).
  113.         RTFI_RemoveEntry - (char *)
  114.                            Name of file or directory you want to remove from
  115.                            the file requester's buffer.
  116.                            It is your responsibility to make sure the file
  117.                            or directory is indeed in the directory the file
  118.                            requester is in.
  119.                            It is harmless use this tag if the requester's
  120.                            buffer is not initialized.
  121.     for the font requester:
  122.         RTFO_FontName    - (char *) 
  123.                            Set the name of the currently selected font.
  124.         RTFO_FontHeight  - (UWORD)
  125.                            Set the fontsize of the currently selected font.
  126.         RTFO_FontStyle   - (UBYTE)
  127.                            Set the style of the current font.
  128.         RTFO_FontFlags   - (UBYTE)
  129.                            Set the flags of the current font.
  130.     for the screenmode requester [V38]:
  131.         RTSC_ModeFromScreen - (struct Screen *)
  132.                               Screen to get mode attributes from.
  133.                               NOTE: You must make sure the mode this screen
  134.                                     is in will be accepted by the screen
  135.                                     mode requester.  Otherwise it will auto-
  136.                                     matically cancel.  For example, you use
  137.                                     RTDI_ModeFromScreen on a HAM screen and
  138.                                     you haven't set the SCREQF_NONSTDMODES
  139.                                     flag.
  140.                               Note that you must use this tag _before_ the
  141.                               four tags below because this tag will set the
  142.                               width, height, depth and autoscroll.
  143.         RTSC_DisplayID      - (ULONG)
  144.                               Set 32-bit mode id of selected mode.  The width
  145.                               and height will be set to the default (visible)
  146.                               width and height, and the depth will be set to
  147.                               maximum.  Also read note above.  Note that you
  148.                               must use this tag _before_ the three tags below
  149.                               because this tag will set the width, height and
  150.                               depth to default values.
  151.         RTSC_DisplayWidth   - (UWORD)
  152.                               Set width of display.  Must come after
  153.                               RTSC_DisplayID or RTSC_ModeFromScreen tags.
  154.         RTSC_DisplayHeight  - (UWORD)
  155.                               Set height of display.  Must come after
  156.                               RTSC_DisplayID or RTSC_ModeFromScreen tags.
  157.         RTSC_DisplayDepth   - (UWORD)
  158.                               Set depth of display.  Must come after
  159.                               RTSC_DisplayID or RTSC_ModeFromScreen tags.
  160.         RTSC_AutoScroll     - (BOOL)
  161.                               Boolean state of autoscroll checkbox.
  162.                               Must come after RTSC_ModeFromScreen tag.
  163.         RTSC_OverscanType   - (ULONG)
  164.                               Set type of overscan.  Set to 0 for regular
  165.                               size, otherwise use OSCAN_... constants.
  166.                               See 'intuition/screens.[h|i]'.
  167.  
  168.   RESULT
  169.     none (except when RTFI_AddEntry tag is used, see above)
  170.  
  171.   BUGS
  172.     none known
  173.  
  174.   SEE ALSO
  175.     dos.library/Lock()
  176.  
  177. reqtools.library/rtCloseWindowSafely     reqtools.library/rtCloseWindowSafely
  178.  
  179.   NAME  rtCloseWindowSafely() [V38]
  180.  
  181.     rtCloseWindowSafely (window);
  182.  
  183.     void rtCloseWindowSafely (struct Window *);
  184.                               A0
  185.  
  186.   DESCRIPTION
  187.     Closes a window which shares its IDCMP port with another window.  All the
  188.     pending messages (concerning this window) on the port will be removed and
  189.     the window will be closed.
  190.  
  191.     Do not use this function to close windows which have an IDCMP port set up
  192.     by Intuition.  If you do the port will be left in memory!
  193.  
  194.     If you intend to open a lot of windows all sharing the same IDCMP port it
  195.     is easiest if you create a port yourself and open all windows with
  196.     newwin.IDCMPFlags set to 0 (this tells Intuition to NOT set up an IDCMP
  197.     port).  After opening the window set the win->UserPort to your message
  198.     port and call ModifyIDCMP() to set your IDCMP flags.
  199.  
  200.     When you then receive messages from intuition check the imsg->IDCMPWindow
  201.     field to find out what window they came from and act upon them.
  202.  
  203.     When closing your windows call rtCloseWindowSafely() for all of them and
  204.     delete your message port.  Easy peasy :-)
  205.  
  206.     NOTE: Only call rtCloseWindowSafely() for windows with a shared IDCMP
  207.           port.  Do *NOT* call it for windows with an IDCMP port created
  208.           by Intuition!
  209.  
  210.   INPUTS
  211.     window - pointer to the window to be closed.
  212.  
  213.   RESULT
  214.     none
  215.  
  216.   NOTE
  217.     This function is for the advanced ReqTools user.
  218.  
  219.   BUGS
  220.     none known
  221.  
  222.   SEE ALSO
  223.     intuition.library/CloseWindow()
  224.  
  225. reqtools.library/rtEZRequestA                   reqtools.library/rtEZRequestA
  226.  
  227.   NAME  rtEZRequestA()
  228.  
  229.     ret = rtEZRequestA (bodyfmt, gadfmt, reqinfo, argarray, taglist);
  230.  
  231.     ULONG rtEZRequestA
  232.                 (char *, char *, struct rtReqInfo *, APTR, struct TagItem *);
  233.     D0           A1      A2      A3                  A4    A0
  234.  
  235.     ret = rtEZRequest (bodyfmt, gadfmt, reqinfo, taglist, arg1, arg2,...);
  236.  
  237.     ULONG rtEZRequest
  238.                   (char *, char *, struct rtReqInfo *, struct TagItem *,...);
  239.  
  240.     ret = rtEZRequestTags(bodyfmt, gadfmt, reqinfo, argarray, tag1,...);
  241.  
  242.     ULONG rtEZRequestTags(char *, char *, struct rtReqInfo *, APTR, Tag,...);
  243.  
  244.   DESCRIPTION
  245.     This function puts up a requester for you and waits for a response from
  246.     the user. If the response is positive, this procedure returns TRUE.
  247.     If the response is negative, this procedure returns FALSE.
  248.     The function may also return an IDCMP flag or a value corresponding with
  249.     one of other possible responses (see below).
  250.  
  251.     'gadfmt' may contain several possible responses.  Separate these
  252.     responses by a '|'.  For example: "Yes|No", or 'Yes|Maybe|No".  The
  253.     responses should be typed in the same order as they will appear on
  254.     screen, from left to right.  There is no limit to the number of responses
  255.     other than the width of the screen the requester will appear on.
  256.  
  257.     'bodyfmt' can contain newlines ('\n', ASCII 10). This will cause a new
  258.     line to be started (surprise, surprise :-).
  259.     You may also include printf() style formatting codes. The format
  260.     arguments should be pointed to by 'argarray'.
  261.     You can use formatting codes in 'gadfmt' as well.  The arguments for
  262.     this format string should follow the ones for 'bodyfmt'.
  263.  
  264.     NOTE: The formatting is done by exec.library/RawDoFmt(), so be aware that
  265.           to display a 32-bit integer argument you must use "%ld", not "%d",
  266.           since RawDoFmt() is "word-oriented."
  267.  
  268.     The second and third function use a variable number of arguments. These
  269.     functions can be found in 'reqtools[nb].lib'.
  270.     The second function has the RawDoFmt() arguments as variable args, the
  271.     third the tags. If you need both this is what you can do:
  272.  
  273.     ...
  274.        {
  275.        ULONG tags[] = { RTEZ_ReqTitle, (ULONG)"mytitle", TAG_END };
  276.  
  277.        rtEZRequest ("String, num: %s, %ld", "Ok", NULL,
  278.                                            (struct TagItem *)tags, "six", 6);
  279.        }
  280.     ...
  281.  
  282.     You can satisfy the requester with the following keyboard shortcuts:
  283.       'Y' or Left Amiga 'V' for a positive response,
  284.       ESC, 'N', 'R' or Left Amiga 'B' for a negative response.
  285.  
  286.     If EZREQF_NORETURNKEY is _not_ set (see RTEZ_Flags below) the RETURN key
  287.     is also accepted as a shortcut for the positive response (can be changed
  288.     using RTEZ_DefaultResponse, see below).  The response that will be
  289.     selected when you press RETURN will be printed in bold.
  290.  
  291.     The EZREQF_LAMIGAQUAL flag should be used when you put up a requester
  292.     for a destructive action (e.g. to delete something).  When it is set
  293.     the keyboard shortcuts are limited to Left Amiga 'V' and 'B' so it is
  294.     harder to accidently select something you will regret.
  295.     Note that the RETURN and ESC key remain active!  To disable the RETURN
  296.     key use the EZREQF_NORETURNKEY flag.  The ESC key cannot be disabled.
  297.  
  298.     You may pass a NULL for 'gadfmt', but make sure you know what you are
  299.     doing.  Passing a NULL opens an EZRequester with NO responses, just a
  300.     body text.  This implies the user has no means of "answering" this
  301.     requester.  You must therefore use the RT_IDCMPFlags tag to allow some
  302.     other events to end the requester (e.g. IDCMP_MOUSEBUTTONS,
  303.     IDCMP_INACTIVEWINDOW,...) or you must make use of the ReqHandler feature.
  304.     Using a requester handler you can end the requester by program control.
  305.     This way you can e.g. put up a requester before you start loading a file
  306.     and remove it after the file has been loaded.  Do not pass an empty
  307.     string as 'gadfmt'!
  308.  
  309.     'reqinfo' can be used to customize the requester.  For greater control
  310.     use the tags listed below.  The advantage of the rtReqInfo structure is
  311.     that it is global, where tags have to be specified each function call.
  312.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  313.  
  314.   INPUTS
  315.     bodyfmt  - requester body text, can be format string a la RawDoFmt().
  316.     gadfmt   - text for gadgets (left to right, separated by '|') or NULL.
  317.     argarray - pointer to array of arguments for format string(s).
  318.     reqinfo  - pointer to a rtReqInfo structure allocated with
  319.                rtAllocRequest() or NULL.
  320.     taglist  - pointer to a TagItem array.
  321.  
  322.   TAGS
  323.     RT_Window       - (struct Window *)
  324.                       Window that will be used to find the screen to put the
  325.                       requester on.
  326.                       If you supply this tag ReqTools will see if this window
  327.                       is active.  If it is not the requester will also be
  328.                       opened in inactive state.
  329.                       You *MUST* supply this if you are a task calling this
  330.                       function and not a process! This is because tasks
  331.                       don't have a pr_WindowPtr.
  332.     RT_IDCMPFlags   - (ULONG)
  333.                       Extra idcmp flags to return on.  If one these IDCMP
  334.                       flags causes the requester to abort the return code
  335.                       will equal the flag in question.
  336.     RT_ReqPos       - (ULONG)
  337.                       One of the following:
  338.                         REQPOS_POINTER    - requester appears where the mouse
  339.                                             pointer is (default).
  340.                         REQPOS_CENTERSCR  - requester is centered on the
  341.                                             screen.
  342.                         REQPOS_CENTERWIN  - requester is centered in the
  343.                                             window (only works if the
  344.                                             pr_WindowPtr of your process is
  345.                                             valid or if you use RT_Window).
  346.                                             If RT_Window is NULL the
  347.                                             requester will be centered on
  348.                                             the screen.
  349.                         REQPOS_TOPLEFTSCR - requester appears at the top left
  350.                                             of the screen.
  351.                         REQPOS_TOPLEFTWIN - requester appears at the top left
  352.                                             of the window (only works if the
  353.                                             pr_WindowPtr of your process is
  354.                                             valid or if you use RT_Window).
  355.                       The requester will always remain in the visible part of
  356.                       the screen, so if you use the Workbench 2.0 ScreenMode
  357.                       preferences editor to enlarge your Workbench screen and
  358.                       you scroll around, the requester will always appear in
  359.                       the part you can see.
  360.                       REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR also apply to
  361.                       the visible part of the screen. So if you use one of
  362.                       these the requester will be appear in the center or the
  363.                       top left off what you can see of the screen as opposed
  364.                       to the entire screen.
  365.                       REQPOS_CENTERWIN and REQPOS_TOPLEFTWIN fall back to
  366.                       REQPOS_CENTERSCR or REQPOS_TOPLEFTSCR respectively
  367.                       when there is no parent window.  So you can safely use
  368.                       these without worrying about the existence of a window.
  369.     RT_LeftOffset   - (ULONG)
  370.                       Offset of left edge of requester relative to position
  371.                       specified with RT_ReqPos (does not offset the requester
  372.                       when RT_ReqPos is REQPOS_POINTER).
  373.     RT_TopOffset    - (ULONG)
  374.                       Offset of top edge of requester relative to position
  375.                       specified with RT_ReqPos (does not offset the requester
  376.                       when RT_ReqPos is REQPOS_POINTER).
  377.     RT_PubScrName   - (char *)
  378.                       Name of public screen requester should appear on. When
  379.                       this tag is used the RT_Window tag will be ignored.
  380.                       If the public screen is not found the requester will
  381.                       open on the default public screen.
  382.                       Only works on Kickstart 2.0!  reqtools.library does
  383.                       not check this, it is up to you *NOT* to use this tag
  384.                       on Kickstart 1.3 or below!
  385.                       Note that the 1.3 version of reqtools.library also
  386.                       understands and supports this tag (on 2.0).
  387.     RT_Screen       - (struct Screen *)
  388.                       Address of screen to put requester on.  You should
  389.                       never use this, use RT_Window or RT_PubScrName.
  390.     RT_ReqHandler   - (struct rtHandlerInfo **)
  391.                       Using this tag you can start an "asynchronous"
  392.                       requester. ti_TagData of the tag must hold the address
  393.                       of a pointer variable to a rtHandlerInfo structure.
  394.                       The requester will initialize this pointer and will
  395.                       return immediately after its normal initialization.
  396.                       The return code will not be what you would normally
  397.                       expect.  If the return code is _not_ equal to
  398.                       CALL_HANDLER an error occurred and you should take
  399.                       appropriate steps. If the return code was CALL_HANDLER
  400.                       everything went ok and the requester will still be up!
  401.                       See the explanation for rtReqHandlerA() below for the
  402.                       following steps you have to take.
  403.     RT_WaitPointer  - (BOOL)
  404.                       If this is TRUE the window calling the requester will
  405.                       get a standard wait pointer set while the requester is
  406.                       up.  This will happen if you used the RT_Window tag or
  407.                       if your process's pr_WindowPtr is valid.  Note that
  408.                       after the requester has finished your window will be
  409.                       ClearPointer()-ed.  If you used a custom pointer in
  410.                       your window you will have to re-set it, or not use the
  411.                       RT_WaitPointer tag and put up a wait pointer yourself.
  412.                       If your program requires ReqTools V38 it is advised you
  413.                       use RT_LockWindow instead.  Defaults to FALSE.
  414.     RT_LockWindow   - (BOOL) [V38]
  415.                       If this is TRUE the window calling the requester will
  416.                       get locked.  It will no longer accept any user input
  417.                       and it will get standard wait pointer set.  This will
  418.                       happen only if you used the RT_Window tag or if your
  419.                       process's pr_WindowPtr is valid.  RT_LockWindow will
  420.                       restore a custom pointer if you have used one (unlike
  421.                       RT_WaitPointer).  So you do not have to worry about
  422.                       having to restore it yourself.  It is advised you use
  423.                       this tag as much as possible. Defaults to FALSE.
  424.                       Under Kickstart V39 the original window pointer will
  425.                       not be restored if it was set using SetWindowPointer().
  426.                       You will have to restore the pointer yourself in this
  427.                       case.
  428.     RT_ScreenToFront - (BOOL) [V38]
  429.                       Boolean indicating whether to pop the screen the
  430.                       requester will appear on to the front. Default is TRUE.
  431.     RT_ShareIDCMP   - (BOOL) [V38]
  432.                       Boolean indicating whether to share the IDCMP port of
  433.                       the parent window. Use this tag together with the
  434.                       RT_Window tag to indicate the window to share IDCMP
  435.                       with. Sharing the IDCMP port produces less overhead,
  436.                       so it is advised you use this tag. Defaults to FALSE.
  437.     RT_Locale       - (struct Locale *) [V38]
  438.                       Locale to determine what language to use for the
  439.                       requester text.  If this tag is not used or its data
  440.                       is NULL, the system's current default locale will be
  441.                       used. Default NULL.
  442.     RT_IntuiMsgFunc - (struct Hook *) [V38]
  443.                       The requester will call this hook for each IDCMP
  444.                       message it gets that doesn't belong to its window.
  445.                       Only applies if you used the RT_ShareIDCMP tag to share
  446.                       the IDCMP port with the parent window.  Parameters are
  447.                       as follows:
  448.                         A0 - (struct Hook *) your hook
  449.                         A2 - (struct rtReqInfo *) your requester info
  450.                         A1 - (struct IntuiMessage *) the message
  451.                       After you have finished examining the message and your
  452.                       hook returns, ReqTools will reply the message.  So do
  453.                       not reply the message yourself!
  454.     RT_Underscore   - (char) [V38]
  455.                       Indicates the symbol that precedes the character in the
  456.                       gadget label to be underscored.  This is to define a
  457.                       keyboard shortcut for this gadget.  Example: to define
  458.                       the key 'Q' as a keyboard shortcut for "Quit" and 'N'
  459.                       for "Oh, No!" you would use the tag RT_Underscore, '_'
  460.                       and pass as gadfmt "_Quit|Oh, _No!".  Do not use the
  461.                       symbol '%' as it is used for string formatting.  The
  462.                       usual character to use is '_' like in the example.
  463.                       IMPORTANT: the shortcuts defined using RT_Underscore
  464.                       take precedence of the default shortcuts!  It is for
  465.                       example not wise to use a 'N' for a positive response!
  466.                       Pick your shortcuts carefully!
  467.     RT_TextAttr     - (struct TextAttr *) [V38]
  468.                       Use this font for the requester.  Default is to use the
  469.                       screen font.  Note that the font must already be
  470.                       opened by you.  ReqTools will call OpenFont() on this
  471.                       TextAttr, _not_ OpenDiskFont()!  If the font cannot be
  472.                       opened using OpenFont() the default screen font will
  473.                       be used.
  474.     RTEZ_ReqTitle   - (char *)
  475.                       Title of requester window, default is "Request" unless
  476.                       the requester has less than 2 responses, then the
  477.                       default title is "Information".
  478.     RTEZ_Flags      - (ULONG)
  479.                       Flags for rtEZRequestA():
  480.                         EZREQF_NORETURNKEY - turn off the RETURN key as
  481.                                              shortcut for positive response.
  482.                         EZREQF_LAMIGAQUAL  - keyboard shortcuts are limited
  483.                                              to Left Amiga 'V' and 'B', ESC
  484.                                              and RETURN.
  485.                         EZREQF_CENTERTEXT  - centers each line of body text
  486.                                              in the requester window. Useful
  487.                                              for about requesters.
  488.     RTEZ_DefaultResponse - (ULONG)
  489.                       Response value that will be returned when the user
  490.                       presses the return key.  Will be ignored if the
  491.                       EZREQF_NORETURNKEY flag is set.  The text for this
  492.                       response will be printed in bold. Default is 1.
  493.  
  494.   RESULT
  495.     ret - 1 (TRUE) for leftmost (positive) response, then each consecutive
  496.           response will return 1 more, the rightmost (false) response will
  497.           return 0 (FALSE), so 1,2,3,...,num-1,0 -- or idcmp flag.
  498.  
  499.   NOTE
  500.     Automatically adjusts the requester to the screen font.
  501.  
  502.     rtEZRequestA() checks the pr_WindowPtr of your process to find the
  503.     screen to put the requester on.
  504.  
  505.   BUGS
  506.     none known
  507.  
  508.   SEE ALSO
  509.     exec.library/RawDoFmt(), rtReqHandlerA()
  510.  
  511. reqtools.library/rtFileRequestA               reqtools.library/rtFileRequestA
  512.  
  513.   NAME  rtFileRequestA()
  514.  
  515.     ret = rtFileRequestA (filereq, filename, title, taglist);
  516.  
  517.     APTR rtFileRequestA
  518.                 (struct rtFileRequester *, char *, char *, struct TagItem *);
  519.     D0           A1                        A2      A3      A0
  520.  
  521.     ret = rtFileRequest (filereq, filename, title, tag1,...);
  522.  
  523.     APTR rtFileRequest (struct rtFileRequester *, char *, char *, Tag,...);
  524.  
  525.   DESCRIPTION
  526.     Get a directory and filename(s), or just a directory from the user.
  527.  
  528.     'filename' should point to an array of at least 108 chars.  The filename
  529.     already in 'filename' will be displayed in the requester when it comes
  530.     up.  When the requester returns 'filename' will probably have changed.
  531.  
  532.     Using certain tags may result in the calling of a caller-supplied hook.
  533.  
  534.     The hook will be called with A0 holding the address of your hook
  535.     structure (you may use the h_Data field to your own liking), A2 a pointer
  536.     to the requester structure calling the hook ('req') and A1 a pointer to
  537.     an object.  The object is variable and depends on what your hook is for.
  538.  
  539.     This is an example of a hook suitable to be used with the RTFI_FilterFunc
  540.     tag:
  541.  
  542.     SAS/C users can define their function thus:
  543.  
  544.     BOOL __asm __saveds filterfunc (register __a0 struct Hook *filterhook,
  545.        register __a2 struct rtFileRequester *req,
  546.        register __a1 struct FileInfoBlock *fib)
  547.     {
  548.        BOOL accepted = TRUE;
  549.  
  550.        /* examine fib to decide if you want this file in the requester */
  551.        ...
  552.        return (accepted);
  553.     }
  554.  
  555.     Your hook structure should then be initialized like this:
  556.  
  557.        filterhook->h_Entry = filterfunc;
  558.        /* in this case no need to initialize hook->h_SubEntry */
  559.        filterhook->h_Data = your_userdata_if_needed;
  560.  
  561.     You can also use a stub written in machine code to call
  562.     your function. (see 'utility/hooks.h')
  563.  
  564.   INPUTS
  565.     filereq  - pointer to a struct rtFileRequester allocated with
  566.                rtAllocRequestA().
  567.     filename - pointer to an array of chars (must be 108 bytes big).
  568.     title    - pointer to requester window title (null terminated).
  569.     taglist  - pointer to a TagItem array.
  570.  
  571.   TAGS
  572.     RT_Window          - see rtEZRequestA()
  573.     RT_ReqPos          - see rtEZRequestA()
  574.     RT_LeftOffset      - see rtEZRequestA()
  575.     RT_TopOffset       - see rtEZRequestA()
  576.     RT_PubScrName      - see rtEZRequestA()
  577.     RT_Screen          - see rtEZRequestA()
  578.     RT_ReqHandler      - see rtEZRequestA()
  579.     RT_WaitPointer     - see rtEZRequestA()
  580.     RT_LockWindow      - [V38] see rtEZRequestA()
  581.     RT_ScreenToFront   - [V38] see rtEZRequestA()
  582.     RT_ShareIDCMP      - [V38] see rtEZRequestA()
  583.     RT_Locale          - [V38] see rtEZRequestA()
  584.     RT_IntuiMsgFunc    - (struct Hook *) [V38]
  585.                          The requester will call this hook for each IDCMP
  586.                          message it gets that doesn't belong to its window.
  587.                          Only applies if you used the RT_ShareIDCMP tag to
  588.                          share the IDCMP port with the parent window.
  589.                          Parameters are as follows:
  590.                            A0 - (struct Hook *) your hook
  591.                            A2 - (struct rtFileRequester *) your requester
  592.                            A1 - (struct IntuiMessage *) the message
  593.                          After you have finished examining the message and
  594.                          your hook returns, ReqTools will reply the message.
  595.                          So do not reply the message yourself!
  596.     RT_Underscore      - (char) [V38]
  597.                          Indicates the symbol that precedes the character in
  598.                          a gadget's label to be underscored.  This will also
  599.                          define the keyboard shortcut for this gadget.
  600.                          Currently only needed for RTFI_OkText.  Usually set
  601.                          to '_'.
  602.     RT_DefaultFont     - (struct TextFont *)
  603.                          This tag allows you to specify the font to be used
  604.                          in the requester when the screen font is
  605.                          proportional. Default is GfxBase->DefaultFont.
  606.                          This tag is obsolete in ReqTools 2.2 and higher.
  607.     RT_TextAttr        - (struct TextAttr *) [V38]
  608.                          Use this font for the requester. Default is to
  609.                          use the screen font.  Note that the font must
  610.                          already be opened by you.  ReqTools will call
  611.                          OpenFont() on this TextAttr, _not_ OpenDiskFont()!
  612.                          If the font cannot be opened using OpenFont() or if
  613.                          the font is proportional the default screen font
  614.                          will be used (or the font set with RT_DefaultFont).
  615.     RTFI_Flags         - (ULONG)
  616.                          Several flags:
  617.                            FREQF_NOBUFFER    - do _not_ use a buffer to
  618.                                                remember directory contents
  619.                                                for the next time the file
  620.                                                requester is used.
  621.                            FREQF_MULTISELECT - allow multiple files to be
  622.                                                selected. rtFileRequest() will
  623.                                                return a pointer to an
  624.                                                rtFileList structure which
  625.                                                will contain all selected
  626.                                                files.  Use rtFreeFileList()
  627.                                                to free the memory used by
  628.                                                this file list.
  629.                            FREQF_SELECTDIRS  - set this flag if you wish to
  630.                                                enable the selecting of dirs
  631.                                                as well as files.  You *must*
  632.                                                also set FREQF_MULTISELECT.
  633.                                                Directories will be returned
  634.                                                together with files in
  635.                                                rtFileList, but with StrLen
  636.                                                equal to -1.  If you need the
  637.                                                length of the directory's name
  638.                                                use strlen().
  639.                            FREQF_SAVE        - Set this if you are using the
  640.                                                requester to save or delete
  641.                                                something.  Double-clicking
  642.                                                will be disabled so it is
  643.                                                harder to make a mistake and
  644.                                                select the wrong file.  If the
  645.                                                user enters a non-existent
  646.                                                directory in the drawer string
  647.                                                gadget, a requester will
  648.                                                appear asking if the directory
  649.                                                should be created.
  650.                            FREQF_NOFILES     - Set this if you want to use
  651.                                                the requester to allow the
  652.                                                user to select a directory
  653.                                                rather than a file.  Ideal for
  654.                                                getting a destination dir. May
  655.                                                be used with FREQF_MULTISELECT
  656.                                                and FREQF_SELECTDIRS.
  657.                            FREQF_PATGAD      - When this is set a pattern
  658.                                                gadget will be added to the
  659.                                                requester.
  660.     RTFI_Height        - (ULONG)
  661.                          Suggested height of file requester window.
  662.     RTFI_OkText        - (char *)
  663.                          Replacement text for "Ok" gadget, max 6 chars long.
  664.     RTFI_VolumeRequest - (ULONG) [V38]
  665.                          The presence of this tag turns the file requester
  666.                          into a volume/assign disk requester.  This requester
  667.                          can be used to get a device name ("DF0:", "DH1:",..)
  668.                          or an assign ("C:", "FONTS:",...) from the user.
  669.                          The result of this requester can be found in the
  670.                          filereq->Dir field.  The volume can also be changed
  671.                          with rtChangeReqAttrA() and the RTFI_Dir tag.  Note
  672.                          that the user may edit the disk/assign names, or
  673.                          enter a new one.  Note also that the real device
  674.                          name is returned, not the name of the volume in the
  675.                          device.  For example "DH1:", not "Hard1:".
  676.                          The tag data (ULONG) is used to set following flags:
  677.                            VREQF_NOASSIGNS - Do not include the assigns in
  678.                                              the list, only the real devices.
  679.                            VREQF_NODISKS   - Do not include devices, just
  680.                                              show the assigns.
  681.                            VREQF_ALLDISKS  - Show _all_ devices.  Default
  682.                                              behavior is to show only those
  683.                                              devices which have valid disks
  684.                                              inserted into them.  So if you
  685.                                              have no disk in drive DF0: it
  686.                                              will not show up.  Set this flag
  687.                                              if you do want these devices
  688.                                              included.
  689.                          NOTE: Do *NOT* use { RTFI_VolumeRequest, TRUE }!
  690.                                You are then setting the VREQF_NOASSIGNS flag!
  691.                                Use { RTFI_VolumeRequest, 0 } for a normal
  692.                                volume requester.
  693.                          NOTE: If you use the RTFI_FilterFunc described
  694.                                below the third parameter will be a pointer
  695.                                to a rtVolumeEntry structure rather than a
  696.                                pointer to a FileInfoBlock structure!
  697.                                Tech note: the DOS device list has been
  698.                                unlocked, so it is safe to e.g. Lock() this
  699.                                device and call Info() on this lock.
  700.                          NOTE: A file requester structure allocated with
  701.                                rtAllocRequest() should not be used for both
  702.                                a file and a volume requester. Allocate two
  703.                                requester structures if you need both a file
  704.                                and a volume requester in your program!
  705.     RTFI_FilterFunc    - (struct Hook *) [V38]
  706.                          Call this hook for each file and directory in the
  707.                          directory being read (or for each entry in the
  708.                          volume requester).
  709.                          Parameters are as follows:
  710.                            A0 - (struct Hook *) your hook
  711.                            A2 - (struct rtFileRequester *) your filereq
  712.                            A1 - (struct FileInfoBlock *) fib of file OR
  713.                                 (struct rtVolumeEntry *) device or assign
  714.                                 in case of a volume requester.
  715.                          If your hook returns TRUE the file will be accepted.
  716.                          If it returns FALSE the file will be skipped and
  717.                          will not appear in the requester.
  718.                          IMPORTANT NOTE: If you change your hook's behavior
  719.                                          you _MUST_ purge the requester's
  720.                                          buffer (using rtFreeReqBuffer())!
  721.                          IMPORTANT NOTE: When this callback hook is called
  722.                                          from a volume requester the
  723.                                          pr_WindowPtr of your process will
  724.                                          be set to -1 so *no* DOS requesters
  725.                                          will appear when an error occurs!
  726.     RTFI_AllowEmpty    - (BOOL) [V38]
  727.                          If RTFI_AllowEmpty is TRUE an empty file string will
  728.                          also be accepted and returned.  Defaults to FALSE,
  729.                          meaning that if the user enters no filename the
  730.                          requester will be canceled.  You should use this tag
  731.                          as little as possible!
  732.  
  733.   RESULT
  734.     ret - TRUE if the user selected a file (check 'filereq->Dir' for the
  735.           directory and 'filename' for the filename) or FALSE if the
  736.           requester was canceled -- or a pointer to a struct rtFileList
  737.           (if FREQF_MULTISELECT was used).
  738.  
  739.   NOTE
  740.     You CANNOT call the file requester from a task because it uses DOS calls!
  741.  
  742.     Automatically adjusts the requester to the screen font.
  743.  
  744.     If the requester got too big for the screen because of a very large font,
  745.     the topaz.font will be used.
  746.  
  747.     rtFileRequest() checks the pr_WindowPtr of your process to find the
  748.     screen to put the requester on.
  749.  
  750.   BUGS
  751.     none known
  752.  
  753.   SEE ALSO
  754.  
  755. reqtools.library/rtFontRequestA               reqtools.library/rtFontRequestA
  756.  
  757.   NAME  rtFontRequestA()
  758.  
  759.     bool = rtFontRequestA (fontreq, title, taglist);
  760.  
  761.     BOOL rtFontRequestA (struct rtFontRequester *, char *, struct TagItem *);
  762.     D0                   A1                        A3      A0
  763.  
  764.     bool = rtFontRequest (fontreq, title, tag1,...);
  765.  
  766.     BOOL rtFontRequest (struct rtFontRequester *, char *, Tag,...);
  767.  
  768.   DESCRIPTION
  769.     Let the user select a font and a style (optional).
  770.  
  771.   INPUTS
  772.     fontreq  - pointer to a struct rtFontRequester allocated with
  773.                rtAllocRequestA().
  774.     title    - pointer to requester window title (null terminated).
  775.     taglist  - pointer to a TagItem array.
  776.  
  777.   TAGS
  778.     RT_Window         - see rtEZRequestA()
  779.     RT_ReqPos         - see rtEZRequestA()
  780.     RT_LeftOffset     - see rtEZRequestA()
  781.     RT_TopOffset      - see rtEZRequestA()
  782.     RT_PubScrName     - see rtEZRequestA()
  783.     RT_Screen         - see rtEZRequestA()
  784.     RT_ReqHandler     - see rtEZRequestA()
  785.     RT_WaitPointer    - see rtEZRequestA()
  786.     RT_LockWindow     - [V38] see rtEZRequestA()
  787.     RT_ScreenToFront  - [V38] see rtEZRequestA()
  788.     RT_ShareIDCMP     - [V38] see rtEZRequestA()
  789.     RT_Locale         - [V38] see rtEZRequestA()
  790.     RT_IntuiMsgFunc   - (struct Hook *) [V38]
  791.                         The requester will call this hook for each IDCMP
  792.                         message it gets that doesn't belong to its window.
  793.                         Only applies if you used the RT_ShareIDCMP tag to
  794.                         share the IDCMP port with the parent window.
  795.                         Parameters are as follows:
  796.                           A0 - (struct Hook *) your hook
  797.                           A2 - (struct rtFontRequester *) your requester
  798.                           A1 - (struct IntuiMessage *) the message
  799.                         After you have finished examining the message and
  800.                         your hook returns, ReqTools will reply the message.
  801.                         So do not reply the message yourself!
  802.     RT_Underscore     - (char) [V38]
  803.                         Indicates the symbol that precedes the character in
  804.                         a gadget's label to be underscored.  This will also
  805.                         define the keyboard shortcut for this gadget.
  806.                         Currently only needed for RTFO_OkText.  Usually set
  807.                         to '_'.
  808.     RT_DefaultFont    - (struct TextFont *)
  809.                         This tag allows you to specify the font to be used in
  810.                         the requester when the screen font is proportional.
  811.                         Default is GfxBase->DefaultFont.
  812.                         This tag is obsolete in ReqTools 2.2 and higher.
  813.     RT_TextAttr       - [V38] see rtFileRequestA()
  814.     RTFO_Flags        - (ULONG)
  815.                         Several flags:
  816.                           FREQF_NOBUFFER      - do not buffer the font list
  817.                                                 for subsequent calls to
  818.                                                 rtFontRequestA().
  819.                           FREQF_FIXEDWIDTH    - only show fixed-width fonts.
  820.                           FREQF_COLORFONTS    - show color fonts also.
  821.                           FREQF_CHANGEPALETTE - change the screen's palette
  822.                                                 to match that of a selected
  823.                                                 color font.
  824.                           FREQF_LEAVEPALETTE  - leave the palette as it is
  825.                                                 when exiting rtFontRequestA()
  826.                                                 Useful in combination with
  827.                                                 FREQF_CHANGEPALETTE.
  828.                           FREQF_SCALE         - allow fonts to be scaled
  829.                                                 when they don't exist in the
  830.                                                 requested size.
  831.                                                 (works on Kickstart 2.0 only,                                                
  832.                                                  has no effect on 1.2/1.3).
  833.                           FREQF_STYLE         - include gadgets so the user
  834.                                                 may select the font's style.
  835.     RTFO_Height       - (ULONG)
  836.                         Suggested height of font requester window.
  837.     RTFO_OkText       - (char *)
  838.                         Replacement text for "Ok" gadget.  Maximum 6 chars.
  839.                         (7 is still ok, but not esthetically pleasing)
  840.     RTFO_SampleHeight - (ULONG)
  841.                         Height of font sample display in pixels (default 24).
  842.     RTFO_MinHeight    - (ULONG)
  843.                         Minimum font size displayed.
  844.     RTFO_MaxHeight    - (ULONG)
  845.                         Maximum font size displayed.
  846.     RTFO_FilterFunc   - (struct Hook *) [V38]
  847.                         Call this hook for each available font.
  848.                         Parameters are as follows:
  849.                           A0 - (struct Hook *) your hook
  850.                           A2 - (struct rtFontRequester *) your filereq
  851.                           A1 - (struct TextAttr *) textattr of font
  852.                         If your hook returns TRUE the font will be accepted.
  853.                         If it returns FALSE the font will be skipped and
  854.                         will not appear in the requester.
  855.                         IMPORTANT NOTE:  If you change your hook's behavior
  856.                         you _MUST_ purge the requester's buffer (using
  857.                         rtFreeReqBuffer())!
  858.  
  859.   RESULT
  860.     bool - TRUE if the user selected a font (freq->Attr holds the font),
  861.            FALSE if the requester was canceled.
  862.  
  863.   NOTE
  864.     You CANNOT call the font requester from a task because it may use DOS
  865.     calls!
  866.  
  867.     Automatically adjusts the requester to the screen font.
  868.  
  869.     If the requester got too big for the screen because of a very large font,
  870.     the topaz.font will be used.
  871.  
  872.     rtFontRequest() checks the pr_WindowPtr of your process to find the
  873.     screen to put the requester on.
  874.  
  875.   BUGS
  876.     none known
  877.  
  878.   SEE ALSO
  879.  
  880. reqtools.library/rtFreeFileList               reqtools.library/rtFreeFileList
  881.  
  882.   NAME  rtFreeFileList()
  883.  
  884.     rtFreeFileList (filelist);
  885.  
  886.     void rtFreeFileList (struct rtFileList *);
  887.                          A0
  888.  
  889.   DESCRIPTION
  890.     Frees a filelist returned by rtFileRequest() when the FREQF_MULTISELECT
  891.     flag was set.  Call this after you have scanned the filelist and you no
  892.     longer need it.
  893.  
  894.   INPUTS
  895.     filelist - pointer to rtFileList structure, returned by rtFileRequest()
  896.                (may be NULL).
  897.  
  898.   RESULT
  899.     none
  900.  
  901.   BUGS
  902.     none known
  903.  
  904.   SEE ALSO
  905.     rtFileRequest()
  906.  
  907. reqtools.library/rtFreeReqBuffer             reqtools.library/rtFreeReqBuffer
  908.  
  909.   NAME  rtFreeReqBuffer()
  910.  
  911.     rtFreeReqBuffer (req);
  912.  
  913.     void rtFreeReqBuffer (APTR);
  914.                           A1
  915.  
  916.   DESCRIPTION
  917.     Frees the buffer associated with 'req'.  In case of a file requester this
  918.     function will deallocate the directory buffer, in case of a font
  919.     requester the font list.
  920.  
  921.     It is safe to call this function for requesters that have no buffer, so
  922.     you may call this for all requesters to free as much memory as possible.
  923.  
  924.   INPUTS
  925.     req - pointer to requester.
  926.  
  927.   RESULT
  928.     none
  929.  
  930.   BUGS
  931.     none known
  932.  
  933.   SEE ALSO
  934.     rtFileRequest(), rtFontRequest()
  935.  
  936. reqtools.library/rtFreeRequest                 reqtools.library/rtFreeRequest
  937.  
  938.   NAME  rtFreeRequest()
  939.  
  940.     rtFreeRequest (req);
  941.  
  942.     void rtFreeRequest (APTR);
  943.                         A1
  944.  
  945.   DESCRIPTION
  946.     Free requester structure previously allocated by rtAllocRequestA().
  947.     This will also free all buffers associated with the requester, so there
  948.     is no need to call rtFreeReqBuffer() first.
  949.  
  950.   INPUTS
  951.     req - pointer to requester (may be NULL).
  952.  
  953.   RESULT
  954.     none
  955.  
  956.   BUGS
  957.     none known
  958.  
  959.   SEE ALSO
  960.     rtAllocRequestA()
  961.  
  962. reqtools.library/rtGetLongA                       reqtools.library/rtGetLongA
  963.  
  964.   NAME  rtGetLongA()
  965.  
  966.     ret = rtGetLongA (&longvar, title, reqinfo, taglist);
  967.  
  968.     ULONG rtGetLongA (ULONG *, char *, struct rtReqInfo *, struct TagItem *);
  969.     D0                A1       A2      A3                  A0
  970.  
  971.     ret = rtGetLong (&longvar, title, reqinfo, tag1,...);
  972.  
  973.     ULONG rtGetLong (ULONG *, char *, struct rtReqInfo *, Tag,...);
  974.  
  975.   DESCRIPTION
  976.     Puts up a requester to get a signed long (32-bit) number from the user.
  977.  
  978.     'reqinfo' can be used to customize the requester.  For greater control
  979.     use the tags listed below.  The advantage of the rtReqInfo structure is
  980.     that it is global, where tags have to be specified each function call.
  981.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  982.  
  983.   INPUTS
  984.     &longvar - address of long (32 bit!) variable to hold result.
  985.     title    - pointer to null terminated title of requester window.
  986.     reqinfo  - pointer to a rtReqInfo structure allocated with
  987.                rtAllocRequest() or NULL.
  988.     taglist  - pointer to a TagItem array.
  989.  
  990.   TAGS
  991.     RT_Window        - see rtEZRequestA()
  992.     RT_IDCMPFlags    - see rtEZRequestA()
  993.     RT_ReqPos        - see rtEZRequestA()
  994.     RT_LeftOffset    - see rtEZRequestA()
  995.     RT_TopOffset     - see rtEZRequestA()
  996.     RT_PubScrName    - see rtEZRequestA()
  997.     RT_Screen        - see rtEZRequestA()
  998.     RT_ReqHandler    - see rtEZRequestA()
  999.     RT_WaitPointer   - see rtEZRequestA()
  1000.     RT_Underscore    - [V38] see rtEZRequestA()
  1001.                        Only when you also use the RTGL_GadFmt tag.
  1002.     RT_LockWindow    - [V38] see rtEZRequestA()
  1003.     RT_ScreenToFront - [V38] see rtEZRequestA()
  1004.     RT_ShareIDCMP    - [V38] see rtEZRequestA()
  1005.     RT_Locale        - [V38] see rtEZRequestA()
  1006.     RT_IntuiMsgFunc  - [V38] see rtEZRequestA()
  1007.     RT_TextAttr      - [V38] see rtEZRequestA()
  1008.                        Note that under 1.2/1.3 the string gadget's font
  1009.                        will remain the screen font.
  1010.     RTGL_Min         - (ULONG)
  1011.                        Minimum allowed value. If the user tries to enter a
  1012.                        smaller value the requester will refuse to accept it.
  1013.     RTGL_Max         - (ULONG)
  1014.                        Maximum allowed value, higher values are refused.
  1015.     RTGL_Width       - (ULONG)
  1016.                        Width of requester window in pixels.  This is only a
  1017.                        suggestion. rtGetLongA() will not go below a
  1018.                        certain width.
  1019.     RTGL_ShowDefault - (BOOL)
  1020.                        If this is TRUE (default) the value already in
  1021.                        'longvar' will be displayed in the requester when it
  1022.                        comes up. If set to FALSE the requester will be empty.
  1023.     RTGL_GadFmt      - (char *) [V38]
  1024.                        Using this tag you can offer the user several
  1025.                        responses.  See rtEZRequestA() for more information.
  1026.                        Note that selecting this gadget is considered a
  1027.                        positive response so the integer in the gadget is
  1028.                        copied to '&longvar'.
  1029.     RTGL_GadFmtArgs  - (APTR) [V38]
  1030.                        If you used formatting codes with RTGL_GadFmt use this
  1031.                        tag to pass the arguments.
  1032.     RTGL_Invisible   - (BOOL) [V38]
  1033.                        Using this tag you can switch on invisible typing.
  1034.                        Very useful if you need to get something like a
  1035.                        code number from the user.  It is strongly advised to
  1036.                        use { RTGL_ShowDefault, FALSE } or the user may get 
  1037.                        very confused!  Default is FALSE.
  1038.     RTGL_BackFill    - (BOOL) [V38]
  1039.                        Backfill requester window with pattern.  Default TRUE.
  1040.     RTGL_TextFmt     - (char *) [V38]
  1041.                        Print these lines of text above the gadget in the
  1042.                        requester.  Very useful to inform the user of what
  1043.                        he should enter.  Most of the time you will also want
  1044.                        to set the GLREQF_CENTERTEXT flag.  If you set the
  1045.                        RTGL_BackFill tag to FALSE _no_ recessed border will
  1046.                        be placed around the text.  Formatting codes may be
  1047.                        used in the string (see RTGL_TextFmtArgs tag).
  1048.     RTGL_TextFmtArgs - (APTR) [V38]
  1049.                        If you used formatting codes with RTGL_TextFmt use
  1050.                        this tag to pass the arguments.
  1051.     RTGL_Flags       - (ULONG) [V38]
  1052.                          GLREQF_CENTERTEXT    - centers each line of text
  1053.                                                 above the gadget in the
  1054.                                                 requester window. Should
  1055.                                                 be generally set.
  1056.                          GLREQF_HIGHLIGHTTEXT - Highlight text above the
  1057.                                                 gadget. You will normally
  1058.                                                 only want to use this if you
  1059.                                                 also turned off the window
  1060.                                                 backfilling.
  1061.  
  1062.   RESULT
  1063.     ret - TRUE if user entered a number, FALSE if not. If one of your idcmp
  1064.           flags caused the requester to end 'ret' will hold this flag.
  1065.           If you used the RTGL_GadFmt tag the return code will hold the
  1066.           value of the response as with rtEZRequestA().
  1067.  
  1068.   NOTE
  1069.     'longvar' will NOT change if the requester is aborted.
  1070.  
  1071.     Automatically adjusts the requester to the screen font.
  1072.  
  1073.     rtGetLongA() checks the pr_WindowPtr of your process to find the
  1074.     screen to put the requester on.
  1075.  
  1076.     If you use the RTGL_GadFmt tag the return value is not always the gadget
  1077.     the user selected.  If the integer gadget is empty and the user presses
  1078.     the leftmost gadget (normally 'Ok') rtGetLong() will return 0 (FALSE)!
  1079.     If the integer gadget is empty and the user presses one of the other
  1080.     gadgets rtGetLong() _will_ return its value!  Important: &longvar will
  1081.     not be changed in either of these cases.
  1082.  
  1083.   BUGS
  1084.     none known
  1085.  
  1086.   SEE ALSO
  1087.  
  1088. reqtools.library/rtGetStringA                   reqtools.library/rtGetStringA
  1089.  
  1090.   NAME  rtGetStringA()
  1091.  
  1092.     ret = rtGetStringA (buffer, maxchars, title, reqinfo, taglist);
  1093.  
  1094.     ULONG rtGetStringA
  1095.               (UBYTE *, ULONG, char *, struct rtReqInfo *, struct TagItem *);
  1096.     D0         A1       D0     A2      A3                  A0
  1097.  
  1098.     ret = rtGetString (buffer, maxchars, title, reqinfo, tag1,...);
  1099.  
  1100.     ULONG rtGetString (UBYTE *, ULONG, char *, struct rtReqInfo *, Tag,...);
  1101.  
  1102.   DESCRIPTION
  1103.     Puts up a string requester to get a line of text from the user.
  1104.     The string present in 'buffer' upon entry will be displayed, ready to
  1105.     be edited.
  1106.  
  1107.     'reqinfo' can be used to customize the requester.  For greater control
  1108.     use the tags listed below.  The advantage of the rtReqInfo structure is
  1109.     that it is global, where tags have to be specified each function call.
  1110.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  1111.  
  1112.   INPUTS
  1113.     buffer   - pointer to buffer to hold characters entered.
  1114.     maxchars - maximum number of characters that fit in buffer (EX-cluding
  1115.                the 0 to terminate the string !).
  1116.     title    - pointer to null terminated title of requester window.
  1117.     reqinfo  - pointer to a rtReqInfo structure allocated with
  1118.                rtAllocRequest() or NULL.
  1119.     taglist  - pointer to a TagItem array.
  1120.  
  1121.   TAGS
  1122.     RT_Window        - see rtEZRequestA()
  1123.     RT_IDCMPFlags    - see rtEZRequestA()
  1124.     RT_ReqPos        - see rtEZRequestA()
  1125.     RT_LeftOffset    - see rtEZRequestA()
  1126.     RT_TopOffset     - see rtEZRequestA()
  1127.     RT_PubScrName    - see rtEZRequestA()
  1128.     RT_Screen        - see rtEZRequestA()
  1129.     RT_ReqHandler    - see rtEZRequestA()
  1130.     RT_WaitPointer   - see rtEZRequestA()
  1131.     RT_Underscore    - [V38] see rtEZRequestA()
  1132.                        Only when you also use the RTGS_GadFmt tag.
  1133.     RT_LockWindow    - [V38] see rtEZRequestA()
  1134.     RT_ScreenToFront - [V38] see rtEZRequestA()
  1135.     RT_ShareIDCMP    - [V38] see rtEZRequestA()
  1136.     RT_Locale        - [V38] see rtEZRequestA()
  1137.     RT_IntuiMsgFunc  - [V38] see rtEZRequestA()
  1138.     RT_TextAttr      - [V38] see rtEZRequestA()
  1139.                        Note that under 1.2/1.3 the string gadget's font
  1140.                        will remain the screen font.
  1141.     RTGS_Width       - (ULONG)
  1142.                        Width of requester window in pixels.  This is only a
  1143.                        suggestion. rtGetStringA() will not go below a certain
  1144.                        width.
  1145.     RTGS_AllowEmpty  - (BOOL)
  1146.                        If RTGS_AllowEmpty is TRUE an empty string will also
  1147.                        be accepted and returned.  Defaults to FALSE, meaning
  1148.                        that if the user enters an empty string the requester
  1149.                        will be canceled.
  1150.     RTGS_GadFmt      - (char *) [V38]
  1151.                        Using this tag you can offer the user several
  1152.                        responses.  See rtEZRequestA() for more information.
  1153.                        Note that selecting this gadget is considered a
  1154.                        positive response so the string in the gadget is
  1155.                        copied to 'buffer'.
  1156.     RTGS_GadFmtArgs  - (APTR) [V38]
  1157.                        If you used formatting codes with RTGS_GadFmt use this
  1158.                        tag to pass the arguments.
  1159.     RTGS_Invisible   - (BOOL) [V38]
  1160.                        Using this tag you can switch on invisible typing.
  1161.                        Very useful if you need to get something like a
  1162.                        password from the user.  It is strongly advised to use
  1163.                        an empty initial string or the user may get very
  1164.                        confused!  Default is FALSE.
  1165.     RTGS_BackFill    - (BOOL) [V38]
  1166.                        Backfill requester window with pattern.  Default TRUE.
  1167.     RTGS_TextFmt     - (char *) [V38]
  1168.                        Print these lines of text above the gadget in the
  1169.                        requester.  Very useful to inform the user of what
  1170.                        he should enter.  Most of the time you will also want
  1171.                        to set the GSREQF_CENTERTEXT flag.  If you set the
  1172.                        RTGS_BackFill tag to FALSE _no_ recessed border will
  1173.                        be placed around the text.  Formatting codes may be
  1174.                        used in the string (see RTGS_TextFmtArgs tag).
  1175.     RTGS_TextFmtArgs - (APTR) [V38]
  1176.                        If you used formatting codes with RTGS_TextFmt use
  1177.                        this tag to pass the arguments.
  1178.     RTGS_Flags       - (ULONG) [V38]
  1179.                          GSREQF_CENTERTEXT    - centers each line of text
  1180.                                                 above the gadget in the
  1181.                                                 requester window. Should
  1182.                                                 be generally set.
  1183.                          GSREQF_HIGHLIGHTTEXT - Highlight text above the
  1184.                                                 gadget. You will normally
  1185.                                                 only want to use this if you
  1186.                                                 also turned off the window
  1187.                                                 backfilling.
  1188.  
  1189.   RESULT
  1190.     ret - TRUE if user entered something, FALSE if not. If one of your idcmp
  1191.           flags caused the requester to end 'ret' will hold this flag.
  1192.           If you used the RTGS_GadFmt tag the return code will hold the
  1193.           value of the response as with rtEZRequestA().
  1194.  
  1195.   NOTE
  1196.     The contents of the buffer will NOT change if the requester is aborted.
  1197.  
  1198.     Automatically adjusts the requester to the screen font.
  1199.  
  1200.     rtGetStringA() checks the pr_WindowPtr of your process to find the
  1201.     screen to put the requester on.
  1202.  
  1203.     If you use the RTGS_GadFmt tag the return value is not always the gadget
  1204.     the user selected.  If the string gadget is empty and the user presses
  1205.     the leftmost gadget (normally 'Ok') rtGetString() will return 0 (FALSE)!
  1206.     If the string gadget is empty and the user presses one of the other
  1207.     gadgets rtGetString() _will_ return its value!  Important: 'buffer' will
  1208.     not be changed in either of these cases.
  1209.     If you set the RTGS_AllowEmpty tag to TRUE 'buffer' will always be
  1210.     changed of course, and rtGetString() will always return the value of the
  1211.     gadget pressed.
  1212.  
  1213.   BUGS
  1214.     none known
  1215.  
  1216.   SEE ALSO
  1217.  
  1218. reqtools.library/rtGetVScreenSize           reqtools.library/rtGetVScreenSize
  1219.  
  1220.   NAME  rtGetVScreenSize()
  1221.  
  1222.     spacing = rtGetVScreenSize (screen, widthptr, heightptr);
  1223.  
  1224.     ULONG rtGetVScreenSize (struct Screen *, ULONG *, ULONG *);
  1225.     D0                      A0               A1       A2
  1226.  
  1227.   DESCRIPTION
  1228.     Use this function to get the size of the visible portion of a screen.
  1229.  
  1230.     The value returned by rtGetVScreenSize() can be used for vertical
  1231.     spacing.  It will be larger for interlaced and productivity screens.
  1232.     Using this number for spacing will assure your requester will look
  1233.     good on an interlaced and a non-interlaced screen.
  1234.  
  1235.     Current return codes are 2 for non-interlaced and 4 for interlaced.
  1236.     These values may change in the future, don't depend on them too much.
  1237.     They will in any case remain of the same magnitude.
  1238.  
  1239.   INPUTS
  1240.     screen    - pointer to the screen.
  1241.     widthptr  - address of an ULONG variable to hold the width.
  1242.     heightptr - address of an ULONG variable to hold the height.
  1243.  
  1244.   RESULT
  1245.     spacing - vertical spacing for the screen.
  1246.  
  1247.   NOTE
  1248.     This function is for the advanced ReqTools user.
  1249.  
  1250.   BUGS
  1251.  
  1252.   SEE ALSO
  1253.  
  1254. reqtools.library/rtLockWindow                   reqtools.library/rtLockWindow
  1255.  
  1256.   NAME  rtLockWindow() [V38]
  1257.  
  1258.     windowlock = rtLockWindow (window);
  1259.  
  1260.     APTR rtLockWindow (struct Window *);
  1261.     D0                 A0
  1262.  
  1263.   DESCRIPTION
  1264.     Lock a window so it will no longer accept any user input.  The only
  1265.     functions left to the user are depth arrangement and window dragging.
  1266.     All gadgets will be un-selectable and the window can not be resized.
  1267.     It will also get the standard wait pointer set.  The pointer at the
  1268.     time of locking will be restored when the window is unlocked (this
  1269.     will *not* happen on Kickstart V39 or higher!).
  1270.  
  1271.     You may nest calls to rtLockWindow() and rtUnlockWindow().  Make sure
  1272.     you unlock the window in the correct (opposite) order.
  1273.  
  1274.     See the RT_LockWindow tag for an automatic way of locking your window.
  1275.  
  1276.     Use this function (and rtUnlockWindow()) instead of rtSetWaitPointer().
  1277.  
  1278.   INPUTS
  1279.     window - pointer to the window to be locked.
  1280.  
  1281.   RESULT
  1282.     windowlock - a pointer to a (private) window lock.  You must pass this
  1283.                  to rtUnlockWindow() to unlock the window again.
  1284.                  Never mind if this is NULL.  This means there was not enough
  1285.                  memory and the window will not be locked.  There is no
  1286.                  sense in reporting this, just carry on and pass the NULL
  1287.                  window lock to rtUnlockWindow().
  1288.  
  1289.   NOTE
  1290.     The wait pointer will look exactly like the standard Workbench 2.0
  1291.     wait pointer.  In combination with PointerX, ClockTick or LacePointer
  1292.     the handle will turn.
  1293.  
  1294.   BUGS
  1295.     none known
  1296.  
  1297.   SEE ALSO
  1298.  
  1299. reqtools.library/rtPaletteRequestA         reqtools.library/rtPaletteRequestA
  1300.  
  1301.   NAME  rtPaletteRequestA()
  1302.  
  1303.     color = rtPaletteRequestA (title, reqinfo, taglist);
  1304.  
  1305.     LONG rtPaletteRequestA (char *, struct rtReqInfo *, struct TagItem *);
  1306.     D0                      A2      A3                  A0
  1307.  
  1308.     color = rtPaletteRequest (title, reqinfo, tag1,...);
  1309.  
  1310.     LONG rtPaletteRequest (char *, struct rtReqInfo *, Tag,...);
  1311.  
  1312.   DESCRIPTION
  1313.     Put up a palette requester so the user can change the screen's colors.
  1314.  
  1315.     The colors are changed in the viewport of the screen the requester will
  1316.     appear on, so that is where you will find them after the palette
  1317.     requester returns.
  1318.  
  1319.     The selected color is returned, so you can also use this requester to let
  1320.     the user select a color.
  1321.  
  1322.     'reqinfo' can be used to customize the requester.  For greater control
  1323.     use the tags listed below.  The advantage of the rtReqInfo structure is
  1324.     that it is global, where tags have to be specified each function call.
  1325.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  1326.  
  1327.   INPUTS
  1328.     title   - pointer to requester window title (null terminated).
  1329.     reqinfo - pointer to a rtReqInfo structure allocated with
  1330.               rtAllocRequest() or NULL.
  1331.     taglist - pointer to a TagItem array.
  1332.  
  1333.   TAGS
  1334.     RT_Window        - see rtEZRequestA()
  1335.     RT_ReqPos        - see rtEZRequestA()
  1336.     RT_LeftOffset    - see rtEZRequestA()
  1337.     RT_TopOffset     - see rtEZRequestA()
  1338.     RT_PubScrName    - see rtEZRequestA()
  1339.     RT_Screen        - see rtEZRequestA()
  1340.     RT_ReqHandler    - see rtEZRequestA()
  1341.     RT_WaitPointer   - see rtEZRequestA()
  1342.     RT_LockWindow    - [V38] see rtEZRequestA()
  1343.     RT_ScreenToFront - [V38] see rtEZRequestA()
  1344.     RT_ShareIDCMP    - [V38] see rtEZRequestA()
  1345.     RT_Locale        - [V38] see rtEZRequestA()
  1346.     RT_IntuiMsgFunc  - [V38] see rtEZRequestA()
  1347.     RT_DefaultFont   - (struct TextFont *)
  1348.                        This tag allows you to specify the font to be used in
  1349.                        the requester when the screen font is proportional.
  1350.                        Default is GfxBase->DefaultFont.
  1351.     RT_TextAttr      - [V38] see rtFileRequestA()
  1352.                        If the font is proportional on Kickstart 2.04 or
  1353.                        below ReqTools will use the system default font or
  1354.                        the font supplied with RT_DefaultFont.  On Kickstart
  1355.                        3.0 or higher the proportional font is used.
  1356.     RTPA_Color       - (ULONG)
  1357.                        Initially selected color of palette.  Default is 1.
  1358.  
  1359.   RESULT
  1360.     color - the color number of the selected color or -1 if the user
  1361.             canceled the requester.
  1362.  
  1363.   NOTE
  1364.     Automatically adjusts the requester to the screen font.
  1365.     On Kickstart 2.04 or lower, if the screen font is proportional the
  1366.     default font will be used.
  1367.  
  1368.     If the requester got too big for the screen because of a very large font,
  1369.     the topaz.font will be used.
  1370.  
  1371.     rtPaletteRequestA() checks the pr_WindowPtr of your process to find the
  1372.     screen to put the requester on.
  1373.  
  1374.   BUGS
  1375.     none known
  1376.  
  1377.   SEE ALSO
  1378.  
  1379. reqtools.library/rtReqHandlerA                 reqtools.library/rtReqHandlerA
  1380.  
  1381.   NAME  rtReqHandlerA()
  1382.  
  1383.     ret = rtReqHandlerA (handlerinfo, sigs, taglist);
  1384.  
  1385.     ULONG rtReqHandlerA (struct rtHandlerInfo *, ULONG, struct TagItem *);
  1386.     D0                   A1                      D0     A0
  1387.  
  1388.     ret = rtReqHandler (handlerinfo, sigs, tag1,...);
  1389.  
  1390.     ULONG rtReqHandler (struct rtHandlerInfo *, ULONG, Tag,...);
  1391.  
  1392.   DESCRIPTION
  1393.     This function should be called if you used the RT_ReqHandler tag with a
  1394.     requester function.
  1395.  
  1396.     The requester you used the tag with will have returned immediately after
  1397.     its initialization and will have initialized a pointer to a rtHandlerInfo
  1398.     structure for you.
  1399.     You should now do the following:
  1400.  
  1401.     Check the DoNotWait field. If it is FALSE you have to wait for the
  1402.     signals in the WaitMask field (plus your own signals if you like).
  1403.     If any of the signals in WaitMask are received or DoNotWait was not FALSE
  1404.     you have to call rtReqHandlerA() and check its return value for one of
  1405.     the following values:
  1406.  
  1407.       CALL_HANDLER    - Check DoNotWait again, Wait() if you have to
  1408.                         and call rtReqHandlerA() again. In other words, loop.
  1409.       everything else - normal return value, requester has finished. This
  1410.                         return value will be the same as if the requester
  1411.                         had run normally.
  1412.  
  1413.     You must pass the signals you received to rtReqHandlerA().
  1414.  
  1415.     NOTE: if you want to wait for your own signals do not do so if
  1416.           DoNotWait is TRUE.  Call rtReqHandlerA() and if you must know
  1417.           if one of your signals arrived use SetSignal() to find this out.
  1418.           If you are waiting for a message to arrive at a message port you
  1419.           can simple call GetMsg() and check if it is non-null.
  1420.           DoNotWait will naturally only be TRUE when it absolutely,
  1421.           positively has to be.  A multitasking machine as the Amiga should
  1422.           use Wait() as much as possible.
  1423.  
  1424.     This is an example of a "requester loop":
  1425.  
  1426.     ...
  1427.     struct rtHandlerInfo *hinfo;
  1428.     ULONG ret, mymask, sigs;
  1429.  
  1430.     ...
  1431.        /* calculate our mask */
  1432.        mymask = 1 << win->UserPort->mp_SigBit;
  1433.  
  1434.        /* We use the RT_ReqHandler tag to cause the requester to return
  1435.           after initializing.
  1436.           Check the return value to see if this setup went ok. */
  1437.        if (rtFontRequest(req, "Font", RT_ReqHandler, &hinfo, TAG_END)
  1438.                                                            == CALL_HANDLER) {
  1439.           do {
  1440.             /* Wait() if we can */
  1441.             if (!hinfo->DoNotWait)
  1442.                sigs = Wait(hinfo->WaitMask | mymask);
  1443.  
  1444.             /* check our own message port */
  1445.             while (msg = GetMsg(win->UserPort)) {
  1446.                ...
  1447.                /* here we handle messages received at our windows IDCMP               ...
  1448.                   port */
  1449.                ...
  1450.                }
  1451.  
  1452.             /* let the requester do its thing (remember to pass 'sigs') */
  1453.             ret = rtReqHandler(hinfo, sigs, TAG_END);
  1454.  
  1455.             /* continue this loop as long as the requester is up */
  1456.             } while (ret == CALL_HANDLER)
  1457.  
  1458.           /* when we get here we know the requester has finished, 'ret'
  1459.              is the return code. */
  1460.           ...
  1461.           }
  1462.        else notify("Error opening requester!");
  1463.     ...
  1464.  
  1465.   INPUTS
  1466.     handlerinfo - pointer to handler info structure initialized by using
  1467.                   the RT_ReqHandler tag when calling a requester function.
  1468.     sigs        - the signals received by previous wait, will be ignored if
  1469.                   hinfo->DoNotWait was TRUE.
  1470.     taglist     - pointer to a TagItem array.
  1471.  
  1472.   TAGS
  1473.     RTRH_EndRequest - supplying this tag will end the requester. The return
  1474.                       code from rtReqHandlerA() will _not_ be CALL_HANDLER,
  1475.                       but the requester return code.  If the tagdata of this
  1476.                       tag is REQ_CANCEL the requester will be canceled, if it
  1477.                       is REQ_OK the requester will be ok-ed.
  1478.                       In case of an EZRequest tagdata should be the return
  1479.                       code of the requester (TRUE, FALSE or 2,3,4,...).
  1480.  
  1481.   RESULT
  1482.     ret - CALL_HANDLER if you have to call rtReqHandlerA() again,
  1483.           or the normal return value from the requester.
  1484.  
  1485.   BUGS
  1486.     none known
  1487.  
  1488.   SEE ALSO
  1489.     rtEZRequest() (RT_ReqHandler explanation)
  1490.  
  1491. reqtools.library/rtScreenModeRequestA   reqtools.library/rtScreenModeRequestA
  1492.  
  1493.   NAME  rtScreenModeRequestA() [V38]
  1494.  
  1495.     ret = rtScreenModeRequestA (screenmodereq, title, taglist);
  1496.  
  1497.     BOOL rtScreenModeRequestA 
  1498.                   (struct rtScreenModeRequester *, char *, struct TagItem *);
  1499.     D0             A1                              A3      A0
  1500.  
  1501.     ret = rtScreenModeRequest (screenmodereq, title, tag1,...);
  1502.  
  1503.     BOOL rtScreenModeRequest
  1504.                            (struct rtScreenModeRequester *, char *, Tag,...);
  1505.  
  1506.   DESCRIPTION
  1507.  
  1508.     *IMPORTANT* THIS REQUESTER IS ONLY AVAILABLE FROM KICKSTART 2.0 ONWARDS!
  1509.                 The 1.3 version of ReqTools also contains the screenmode
  1510.                 requester, but unless you are running 2.0 or higher it will
  1511.                 not come up.  So what you essentially have to do is NOT
  1512.                 call rtScreenModeRequestA() if your program is running on
  1513.                 a machine with Kickstart 1.2/1.3.  You can safely call
  1514.                 rtScreenModeRequestA() if you are running on a 2.0 machine,
  1515.                 even if the user has installed the 1.3 version of ReqTools.
  1516.  
  1517.     Get a screen mode from the user.
  1518.  
  1519.     The user will be able to pick a screen mode by name, enter the size and
  1520.     the number of colors (bitplane depth).
  1521.  
  1522.     rtScreenModeRequestA() will call the appropriate 2.0 functions to get all
  1523.     the mode's information.  If no name has been assigned to the mode one
  1524.     will be constructed automatically.
  1525.  
  1526.   INPUTS
  1527.     screenmodereq - pointer to a struct rtScreenModeRequester allocated with
  1528.                     rtAllocRequestA().
  1529.     title         - pointer to requester window title (null terminated).
  1530.     taglist       - pointer to a TagItem array.
  1531.  
  1532.   TAGS
  1533.     RT_Window          - see rtEZRequestA()
  1534.     RT_ReqPos          - see rtEZRequestA()
  1535.     RT_LeftOffset      - see rtEZRequestA()
  1536.     RT_TopOffset       - see rtEZRequestA()
  1537.     RT_PubScrName      - see rtEZRequestA()
  1538.     RT_Screen          - see rtEZRequestA()
  1539.     RT_ReqHandler      - see rtEZRequestA()
  1540.     RT_WaitPointer     - see rtEZRequestA()
  1541.     RT_LockWindow      - see rtEZRequestA()
  1542.     RT_ScreenToFront   - see rtEZRequestA()
  1543.     RT_ShareIDCMP      - see rtEZRequestA()
  1544.     RT_Locale          - see rtEZRequestA()
  1545.     RT_IntuiMsgFunc    - (struct Hook *) [V38]
  1546.                          The requester will call this hook for each IDCMP
  1547.                          message it gets that doesn't belong to its window.
  1548.                          Only applies if you used the RT_ShareIDCMP tag to
  1549.                          share the IDCMP port with the parent window.
  1550.                          Parameters are as follows:
  1551.                            A0 - (struct Hook *) your hook
  1552.                            A2 - (struct rtScreenModeRequester *) your req
  1553.                            A1 - (struct IntuiMessage *) the message
  1554.                          After you have finished examining the message and
  1555.                          your hook returns, ReqTools will reply the message.
  1556.                          So do not reply the message yourself!
  1557.     RT_Underscore      - (char) [V38]
  1558.                          Indicates the symbol that precedes the character in
  1559.                          a gadget's label to be underscored.  This will also
  1560.                          define the keyboard shortcut for this gadget.
  1561.                          Currently only needed for RTSC_OkText.  Usually set
  1562.                          to '_'.
  1563.     RT_DefaultFont     - (struct TextFont *)
  1564.                          This tag allows you to specify the font to be used
  1565.                          in the requester when the screen font is
  1566.                          proportional.  Default is GfxBase->DefaultFont.
  1567.                          This tag is obsolete in ReqTools 2.2 and higher.
  1568.     RT_TextAttr        - [V38] see rtFileRequestA()
  1569.     RTSC_Flags         - (ULONG)
  1570.                          Several flags:
  1571.                            SCREQF_OVERSCANGAD   - Add an overscan cycle
  1572.                                                   gadget to the requester.
  1573.                                                   After the requester returns
  1574.                                                   you may read the overscan
  1575.                                                   type in 'rq->OverscanType'
  1576.                                                   If this is 0 no overscan is
  1577.                                                   selected (Regular Size), if
  1578.                                                   non-zero it holds one of
  1579.                                                   the OSCAN_... values
  1580.                                                   defined in the include file
  1581.                                                   'intuition/screens.[h|i]'.
  1582.                            SCREQF_AUTOSCROLLGAD - Add an autoscroll checkbox
  1583.                                                   gadget to the requester.
  1584.                                                   After the requester returns
  1585.                                                   read 'smreq->AutoScroll' to
  1586.                                                   see if the user prefers
  1587.                                                   autoscroll to be on or off.
  1588.                            SCREQF_SIZEGADS      - Add width and height
  1589.                                                   gadgets to the requester.
  1590.                                                   If you do not add these
  1591.                                                   gadgets the width and
  1592.                                                   height returned will be the
  1593.                                                   default width and height
  1594.                                                   for the selected overscan
  1595.                                                   type.
  1596.                            SCREQF_DEPTHGAD      - Add a depth slider gadget
  1597.                                                   to the requester.  If you
  1598.                                                   do not add a depth gadget,
  1599.                                                   the depth returned will be
  1600.                                                   the maximum depth this mode
  1601.                                                   can be opened in.
  1602.                            SCREQF_NONSTDMODES   - Include all modes. Unless
  1603.                                                   this flag is set
  1604.                                                   rtScreenModeRequestA()
  1605.                                                   will exclude nonstandard
  1606.                                                   modes.  Nonstandard modes
  1607.                                                   are presently HAM and EHB
  1608.                                                   (ExtraHalfBrite). So unless
  1609.                                                   you are picking a mode to
  1610.                                                   do some rendering in leave
  1611.                                                   this flag unset.  Without
  1612.                                                   this flag set the mode
  1613.                                                   returned will be a normal
  1614.                                                   bitplaned mode.
  1615.                            SCREQF_GUIMODES      - Set this flag if you are
  1616.                                                   getting a screen mode to
  1617.                                                   open a user interface
  1618.                                                   screen in.  The modes
  1619.                                                   shown will be standard
  1620.                                                   modes with a high enough
  1621.                                                   resolution (minumum 640
  1622.                                                   pixels).  If this flag is
  1623.                                                   set the SCREQF_NONSTDMODES
  1624.                                                   flag is ignored.
  1625.     RTSC_Height        - (ULONG)
  1626.                          Suggested height of screenmode requester window.
  1627.     RTSC_OkText        - (char *)
  1628.                          Replacement text for "Ok" gadget, max 6 chars long.
  1629.     RTSC_MinWidth      - (UWORD)
  1630.                          The minimum display width allowed.
  1631.     RTSC_MaxWidth      - (UWORD)
  1632.                          The maximum display width allowed.
  1633.     RTSC_MinHeight     - (UWORD)
  1634.                          The minimum display height allowed.
  1635.     RTSC_MaxHeight     - (UWORD)
  1636.                          The maximum display height allowed.
  1637.     RTSC_MinDepth      - (UWORD)
  1638.                          The minimum display depth allowed.  Modes with a
  1639.                          minimum display depth lower than this value will not
  1640.                          be included in the list.
  1641.     RTSC_MaxDepth      - (UWORD)
  1642.                          The maximum display depth allowed.
  1643.     RTSC_PropertyFlags - (ULONG)
  1644.                          A mode must have these property flags to be
  1645.                          included.  Only bits set in RTSC_PropertyMask are
  1646.                          considered.
  1647.     RTSC_PropertyMask  - (ULONG)
  1648.                          Mask to apply to RTSC_PropertyFlags to determine
  1649.                          which bits to consider.  See use of 'newsignals' and
  1650.                          'signalmask' in exec.library/SetSignal().  Default
  1651.                          is to consider all bits in RTSC_PropertyFlags as
  1652.                          significant.
  1653.     RTSC_FilterFunc    - (struct Hook *)
  1654.                          Call this hook for each display mode id in the
  1655.                          system's list.
  1656.                          Parameters are as follows:
  1657.                            A0 - (struct Hook *) your hook
  1658.                            A2 - (struct rtScreenModeRequester *) your req
  1659.                            A1 - (ULONG) 32-bit extended mode id
  1660.                          If your hook returns TRUE the mode will be accepted.
  1661.                          If it returns FALSE the mode will be skipped and
  1662.                          will not appear in the requester.
  1663.  
  1664.   RESULT
  1665.     ret - FALSE if the requester was canceled or TRUE if the user selected a
  1666.           screen mode (check 'smreq->DisplayID' for the 32-bit extended
  1667.           display mode, 'smreq->DisplayWidth' and 'smreq->DisplayHeight' for
  1668.           the display size, 'smreq->DisplayDepth' for the screen's depth).
  1669.  
  1670.   NOTE
  1671.     Automatically adjusts the requester to the screen font.
  1672.  
  1673.     If the requester got too big for the screen because of a very large font,
  1674.     the topaz.font will be used.
  1675.  
  1676.     rtScreenModeRequest() checks the pr_WindowPtr of your process to find the
  1677.     screen to put the requester on.
  1678.  
  1679.   BUGS
  1680.     none known
  1681.  
  1682.   SEE ALSO
  1683.     graphics/GetDisplayInfoData() graphics/displayinfo.h
  1684.     exec.library/SetSignal()
  1685.     Intuition/SA_DisplayID screen tag
  1686.  
  1687. reqtools.library/rtScreenToFrontSafely reqtools.library/rtScreenToFrontSafely
  1688.  
  1689.   NAME  rtScreenToFrontSafely()
  1690.  
  1691.     rtScreenToFrontSafely (screen); 
  1692.  
  1693.     void rtScreenToFrontSafely (struct Screen *);
  1694.                                 A0
  1695.  
  1696.   DESCRIPTION
  1697.     Brings the specified screen to the front of the display, but only after
  1698.     checking it is still in the list of currently open screens.
  1699.  
  1700.     This function can be used to bring a screen back to the front of the
  1701.     display after bringing another screen to the front.  If the first screen
  1702.     closed while you where busy it is harmless to call this function, unlike
  1703.     calling the normal ScreenToFront().
  1704.  
  1705.   INPUTS
  1706.     screen - pointer to the screen.
  1707.  
  1708.   RESULT
  1709.     none
  1710.  
  1711.   NOTE
  1712.     This function is for the advanced ReqTools user.
  1713.  
  1714.   BUGS
  1715.     none known
  1716.  
  1717.   SEE ALSO
  1718.     intuition.library/ScreenToFront()
  1719.  
  1720. reqtools.library/rtSetReqPosition           reqtools.library/rtSetReqPosition
  1721.  
  1722.   NAME  rtSetReqPosition()
  1723.  
  1724.     rtSetReqPosition (reqpos, newwindow, screen, window);
  1725.  
  1726.     void rtSetReqPosition
  1727.                (ULONG, struct NewWindow *, struct Screen *, struct Window *);
  1728.                 D0     A0                  A1               A2
  1729.  
  1730.   DESCRIPTION
  1731.     Sets newwindow->LeftEdge and newwindow->TopEdge according to reqpos.
  1732.  
  1733.     Except for the left- and topedge 'newwindow' must already be completely
  1734.     initialized.
  1735.  
  1736.     The newwindow->LeftEdge and newwindow->TopEdge already in the NewWindow
  1737.     structure will be used as offsets to the requested position.  If you'd
  1738.     like a window at position (25,18) from the top left of the screen you
  1739.     would fill newwindow->LeftEdge with 25, newwindow->TopEdge with 18 and
  1740.     call rtSetReqPosition() with reqpos equal to REQPOS_TOPLEFTSCR.
  1741.  
  1742.     Don't forget to make sure newwindow->LeftEdge and newwindow->TopEdge
  1743.     are 0 if you don't want to offset your window.
  1744.  
  1745.     In case of REQPOS_POINTER you can use them to point to your window's
  1746.     hotspot, where the pointer should point.  If you call rtSetReqPosition()
  1747.     with the left- and topedge equal to 0 you'd get a window appearing with
  1748.     its top- and leftedge equal to the current pointer position.
  1749.  
  1750.     Note that the screen pointer may _NOT_ be NULL.  If you have your own
  1751.     window open you can supply yourwindow->WScreen to this function.
  1752.  
  1753.     The window pointer is only required if reqpos is REQPOS_CENTERWIN or
  1754.     REQPOS_TOPLEFTWIN.  Even in this case you may call rtSetReqPosition()
  1755.     with a NULL window pointer.  The positions will simply fall back to
  1756.     REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR respectively.
  1757.  
  1758.   INPUTS
  1759.     reqpos    - one of the REQPOS_... constants usable with RT_ReqPos.
  1760.     newwindow - pointer to your (already initialized) NewWindow structure.
  1761.     screen    - pointer to screen the requester will appear on.
  1762.     window    - pointer to parent window or NULL.
  1763.  
  1764.   RESULT
  1765.     none
  1766.  
  1767.   NOTE
  1768.     This function is for the advanced ReqTools user.
  1769.  
  1770.   BUGS
  1771.     none known
  1772.  
  1773.   SEE ALSO
  1774.     RT_ReqPos tag
  1775.  
  1776. reqtools.library/rtSetWaitPointer           reqtools.library/rtSetWaitPointer
  1777.  
  1778.   NAME  rtSetWaitPointer()
  1779.  
  1780.     rtSetWaitPointer (window);
  1781.  
  1782.     void rtSetWaitPointer (struct Window *);
  1783.                            A0
  1784.  
  1785.   DESCRIPTION
  1786.     Change the window's pointer image to that of a wait pointer.  Call this
  1787.     function whenever your program will be busy doing something for a lengthy
  1788.     period of time.
  1789.  
  1790.     It is recommended you call this function before calling any of the
  1791.     requester functions.  This way if the user clicks in your window he will
  1792.     know he must respond to the requester before doing anything else.  Also
  1793.     see the RT_WaitPointer tag for an automatic way of setting the wait
  1794.     pointer.  If you are using ReqTools V38+ check out the RT_LockWindow tag!
  1795.  
  1796.   INPUTS
  1797.     window - pointer to the window to receive the wait pointer.
  1798.  
  1799.   RESULT
  1800.     none
  1801.  
  1802.   NOTE
  1803.     The wait pointer will look exactly like the standard Workbench 2.0
  1804.     wait pointer.  In combination with PointerX, ClockTick or LacePointer
  1805.     the handle will turn.
  1806.  
  1807.   BUGS
  1808.     none known
  1809.  
  1810.   SEE ALSO
  1811.  
  1812. reqtools.library/rtSpread                           reqtools.library/rtSpread
  1813.  
  1814.   NAME  rtSpread()
  1815.  
  1816.     rtSpread (posarray, sizearray, totalsize, min, max, num);
  1817.  
  1818.     void rtSpread (ULONG *, ULONG *, ULONG, ULONG, ULONG, ULONG);
  1819.                    A0       A1       D0     D1     D2     D3
  1820.  
  1821.   DESCRIPTION
  1822.     Evenly spread a number of objects over a certain length.
  1823.     Primary use is for arrangement of gadgets in a window.
  1824.  
  1825.     Example:
  1826.  
  1827.     'sizearray' holds following values: 4, 6, 4, 2 and 8,
  1828.     'totalsize' is 24 (= 4 + 6 + 4 + 2 + 8),
  1829.     'min' is 3, 'max' is 43,
  1830.     and finally, 'num' is 5.
  1831.  
  1832.     After calling rtSpread() 'posarray' would hold the following
  1833.     values: 3, 11, 19, 26 and 31.
  1834.  
  1835.     My attempt at a visual representation:
  1836.  
  1837.         |                                            |
  1838.         |  |                                      |  |
  1839.         |  OOOO    OOOOOO    OOOO    OO    OOOOOOOO  |
  1840.         |  |                                      |  |
  1841.         |         1    1    2    2    3    3    4    4
  1842.         0----5----0----5----0----5----0----5----0----5
  1843.  
  1844.   INPUTS
  1845.     posarray  - pointer to array to be filled with positions.
  1846.     sizearray - pointer to array of sizes.
  1847.     totalsize - total size of all objects (sum of all values in sizearray).
  1848.     min       - first position to use.
  1849.     max       - last position, first _NOT_ to use.
  1850.     num       - number of objects (size of posarray and sizearray).
  1851.  
  1852.   RESULT
  1853.     none
  1854.  
  1855.   NOTE
  1856.     This function is for the advanced ReqTools user.
  1857.  
  1858.   BUGS
  1859.     none known
  1860.  
  1861.   SEE ALSO
  1862.  
  1863. reqtools.library/rtUnlockWindow               reqtools.library/rtUnlockWindow
  1864.  
  1865.   NAME  rtUnlockWindow() [V38]
  1866.  
  1867.     rtUnlockWindow (window, windowlock);
  1868.  
  1869.     void rtUnlockWindow (struct Window *, APTR);
  1870.                          A0               A1
  1871.  
  1872.   DESCRIPTION
  1873.     Unlock a window previously locked with rtLockWindow().  The window will
  1874.     once again accept user input and will get its original mouse pointer
  1875.     back (default or custom).
  1876.  
  1877.     Under Kickstart V39 or higher the original window pointer will not be
  1878.     restored if it was set using SetWindowPointer().  You will have to
  1879.     restore the pointer yourself in this case.
  1880.  
  1881.   INPUTS
  1882.     window     - pointer to the window to be unlocked.
  1883.     windowlock - the windowlock pointer returned by rtLockWindow(), may
  1884.                  be NULL.
  1885.  
  1886.   RESULT
  1887.     none
  1888.  
  1889.   BUGS
  1890.     none known
  1891.  
  1892.   SEE ALSO
  1893.  
  1894.